﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Component_UsMenuNetworkType : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            LoadNetworkTypeData();
        }
    }

    private void LoadNetworkTypeData()
    {
        string strHtml = "";
        try
        {
            DataSet ds = new DataSet();
            ds = CNetworkType.selectNetworkType();
            if (ds != null)
            {
                if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    strHtml += "<div style='background-color:White'>";
                    strHtml += "<div id='titilebar'>Nhà Cung Cấp</div>";
                    strHtml += "<div id='blueblock'>";
                    strHtml += "<ul>";
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        strHtml += "<li><a href='Networktype.aspx?NTID=" + ds.Tables[0].Rows[i]["ID"].ToString() + "'>" + ds.Tables[0].Rows[i]["Name"].ToString() + "</a></li>";
                    }
                    strHtml += "</ul>";
                    strHtml += "</div>";
                    strHtml += "</div>";
                    lbNetworkType.Text = strHtml;
                }
            }
        }
        catch
        {
            strHtml = "";
            lbNetworkType.Text = strHtml;
        }

    }
}
